Method, apparatus and system for controlling vehicle motor based on motor stall detection

ABSTRACT

A method, an apparatus and a system for controlling a motor based on motor stall detection are provided. The method includes driving the motor based on an external control signal and receiving information regarding an output voltage of the motor at a predetermined motor detection cycle from a sensor that corresponds to the motor. A bottom value is set by comparing a level of the received output voltage of the motor with a preset limit value and the limit value is changed to the set bottom value when the level of the received output voltage of the motor exceeds the limit value a predetermined number of times corresponding to a predetermined threshold value. Therefore, the present invention has an advantage of adaptively operating a motor based on characteristic change of the motor due to operation durability and external environment change.

CROSS REFERENCE TO RELATED APPLICATION(S)

This application claims the benefit of Korean Patent Application10-2015-0157111, filed on Nov. 10, 2015, which is hereby incorporated byreference as if fully set forth herein.

BACKGROUND

Field of the Invention

The present invention relates to motor control, and more particularly,to a method, an apparatus and a system for operating a motor based onmotor stall detection capable of preventing damage to the motor bycontrolling an operation of the motor based on motor stall detection.

Discussion of the Related Art

In general, a vehicle includes various motors for convenience ofdriving, enhancement of fuel efficiency, and passenger convenience. Amotor for vehicles restricts limited driving of a driver, and thusrequires stall condition control logic, a sensor for the logic, andsetting of various limits. In particular, when a position of vehicleequipment such as a seat, an interior side rear view mirror (ISRVM), anexterior side rear view mirror (OSRVM), a rear (RR) curtain, a powerwindow, a wiper motor, etc. needs to be stored or the equipment needs tobe driven, there may be difficulty in setting an accurate driving areain each direction and implementing a resolution based on position.

In general, the motor in the vehicle is operated by sensor monitoringand is vulnerable to adjustment of a motor limit value when externalnoise is applied thereto. In particular, when an initial value of theposition of the motor is lost, setting of the driving area may fail.Additionally, overcurrent may occur in the vehicle motor due to acontinuous operation and motor stall. When overcurrent continuouslyoccurs, the motor may be damaged. Accordingly, many vehicles include acircuit breaker for blocking supply of power applied to a motor when themotor is overloaded. A device capable of turning power applied to themotor on and off based on whether an abnormal condition, for example, ashort circuit condition is detected has been used as the circuitbreaker.

Eight schemes described below correspond to representative related artfor controlling stall of a motor for vehicles.

In a first scheme, a motor power supply or controller operation stallcondition is switched by a disable signal using a limit switch. Forexample, in a power seat, power applied to a motor may be adjusted byinstalling an open type limit switch at an end of each rail during asliding operation, a reclining operation, a tilting operation, etc.

In a second scheme, stall of a motor for vehicles is controlled bysetting a stall interval using a voltage resolution based on a sensorinput of an alternating current (AC)-direct current (DC) converter (ADCconverted) in the motor.

In a third scheme, a motor is stalled under a particular condition bydetecting a waveform of a stall current during overrunning of the motor,that is, at the time of reaching a dimensional limit of the motor. Forexample, the motor may stall when a maximum voltage of a sawtooth wavedetected by a stall current sensor exceeds about 60 mV.

In a fourth scheme, driving of a motor is restricted by driving apredetermined timer during continuous operation. For example, when awasher motor is driven, a maximum driving time may be restricted toabout 30 seconds in consideration of durability.

In a fifth scheme, a motor is suspended by operating a circuit breakerbased on an operating time of the motor. For example, an operating timeof a power window motor is calculated, and the motor is suspended byoperating a circuit breaker when the calculated operating time isgreater than or equal to a predetermined time or longer than anon-operating time.

In a sixth scheme, power supplied to a motor is controlled based on heatgenerated from the motor. For example, power supplied to a motor isphysically blocked using a bimetal when heat is generated by the motor.

In a seventh scheme, driving of a motor is controlled by setting a limitvalue of a stall current/voltage. For example, when a voltage sensingvalue of a motor in a direction of a driving shaft is detected to beless than or equal to a predetermined reference value, for example,about 1.5 V during power door cinching, stall is detected and a motoroutput is blocked.

In an eighth scheme, a driving area of a motor is restricted by settingranges of a motor driving voltage and a sensor input. For example, amotor driving area may be restricted by setting a voltage sensing valuein a direction of a driving shaft of a motor to a range of about 1.5 Vto 4.5 V.

Motor detection schemes according to the eight related arts describedabove have disadvantages in that separate control logic and hardware arerequired for each device, and a component, which restricts a mechanicaldriving area of a motor and incurs additional cost, needs to be used. Inparticular, the bimetal and the limit switch have limitations on costand setting of physical dimensions, and thus degrees of freedom ofcomponent arrangement and wiring are degraded. As a result, there hasbeen a problem of increase in overall volume and weight of the motor.Moreover, the above limited time setting scheme, stall current detectionscheme, etc. have a disadvantage in that control accuracy andperformance are degraded due to a temperature, a dimensional limit,wear, etc.

SUMMARY

Accordingly, the present invention provides a method, an apparatus and asystem for controlling a motor based on motor stall detection thatsubstantially obviates one or more problems due to limitations anddisadvantages of the related art. Another object of the presentinvention is to provide a method, an apparatus and a system forcontrolling a motor based on motor stall detection capable ofdynamically changing various parameter values for motor driving controlby collecting and learning sensing information while the motor is beingdriven.

Technical problems to be solved by the present invention are not limitedto the above-mentioned technical problems, and other technical problemsnot mentioned herein may be clearly understood by those skilled in theart from description below.

The present invention provides a method, an apparatus and a system forcontrolling a motor based on motor stall. To achieve these objects andother advantages and in accordance with the purpose of the invention, asembodied and broadly described herein, a method of controlling a motorby a controller may include driving the motor based on an externalcontrol signal, receiving information regarding an output voltage of themotor at a predetermined motor detection cycle from a sensor thatcorresponds to the motor, setting a bottom value by comparing a level ofthe received output voltage of the motor with a preset limit value, andadjusting the limit value to the set bottom value when the level of thereceived output voltage of the motor exceeds the limit value apredetermined number of times corresponding to a predetermined thresholdvalue.

In particular, a predetermined stall counter may be increased when thelevel of the output voltage of the motor exceeds the limit value, andthe predetermined stall counter may be decreased when the level of theoutput voltage of the motor is less than the limit value, wherein theset bottom value may be released when the stall counter has a value ofabout 0. In addition, the motor may be determined to have stalled whenthe level of the received output voltage of the motor exceeds the limitvalue the predetermined number of times corresponding to thepredetermined threshold value, and power supply to the motor may beblocked. In addition, a value of the output voltage of the motorreceived before an operation direction of the motor is changed may beset to the bottom value when the operation direction of the motor ischanged while the bottom value is set.

In addition, the method may further include calculating a cumulativedriving time of the motor after the motor is detected to have stalled,wherein the limit value is changed to an initial factory value when themotor is not detected to have stalled again until the cumulative drivingtime exceeds a predetermined reference value. The method may alsoinclude operating a predetermined cycle timer when the motor is driven,wherein the limit value may be changed to an initial factory value whenthe cycle timer expires a number of times corresponding to apredetermined maximum expiration count while the motor is not detectedto have stalled.

Further, the method may include receiving information regarding atemperature and a motor operating speed from the sensor, collectingstatistical data regarding a temperature characteristic for identifyinga change in motor operating speed based on the temperature, generating arule for correction of the limit value based on the statistical dataregarding the temperature characteristic, and driving the motor using aparameter value corrected based on the generated rule for correction ofthe limit value.

In addition, the method may further include receiving informationregarding a period and a peak voltage of a triangular wave supplied tothe motor from the sensor, collecting statistical data regarding acharacteristic of the triangular wave by analyzing a change pattern ofthe period and the peak voltage of the triangular wave based onoperation durability, and correcting a minimum voltage of the triangularwave based on the collected statistical data regarding thecharacteristic of the triangular wave to maintain a peak voltage of thetriangular wave at a predetermined reference value or greater. Inaddition, the method may further include receiving information regardinga reference axis for changing an operation direction of the motor fromthe sensor, and correcting the reference axis to an initial factoryvalue when a cumulative error of the reference axis is equal to orgreater than a predetermined reference value.

In another aspect of the present invention, a controller configured todrive a motor, may include a communication unit configured to receive anexternal control signal for the motor driving, a motor sensinginformation collection unit configured to receive information regardingan output voltage of the motor at a predetermined motor detection cyclefrom a sensor that corresponds to the motor when the motor is drivenbased on the external control signal, and a motor stall determinationunit configured to set a bottom value by comparing a level of thereceived output voltage of the motor with a preset limit value,determining that the motor has stalled when the level of the receivedoutput voltage of the motor exceeds the limit value a predeterminednumber of times corresponding to a predetermined threshold value, andadjusting the limit value to the set bottom value.

Particularly, the motor stall determination unit may be configured toincrease a predetermined stall counter when the level of the outputvoltage of the motor exceeds the limit value, and decrease thepredetermined stall counter when the level of the output voltage of themotor is less than the limit value, wherein the motor stalldetermination unit may be configured to release the set bottom valuewhen the stall counter has a value of about 0. In addition, the motorstall determination unit may be configured to determine that the motorhas stalled when the level of the received output voltage of the motorexceeds the limit value the predetermined number of times correspondingto the predetermined threshold value.

In addition, the controller may further include a motor driving unitconfigured to operate the motor, wherein the motor driving unit may beconfigured to block power supply to the motor when the motor hasstalled. The motor stall determination unit may be configured to set avalue of the output voltage of the motor received before an operationdirection of the motor is changed to the bottom value when the operationdirection of the motor is changed while the bottom value is set.

The controller may further include a timer configured to calculate acumulative driving time of the motor after the motor is detected to havestalled, wherein the motor stall determination unit may be configured toset the limit value to an initial factory value when the motor is notdetected to have stalled again until the cumulative driving time exceedsa predetermined reference value. In addition, the controller may includea timer configured to drive a predetermined cycle timer when the motoris driven, wherein the motor stall determination unit may be configuredto set the limit value to an initial factory value when the cycle timerexpires a number of times corresponding to a predetermined maximumexpiration count while the motor is not detected to have stalled.

Furthermore, the motor sensing information collection unit may furtherbe configured to receive information regarding a temperature and a motoroperating speed from the sensor to collect statistical data regarding atemperature characteristic for identifying a change in motor operatingspeed based on the temperature. In particular, the controller mayinclude a parameter correction unit configured to generate a rule forcorrection of the limit value based on the statistical data regardingthe temperature characteristic, wherein driving of the motor may beexecuted using a parameter value corrected based on the generated rulefor correction of the limit value.

In addition, the motor sensing information collection unit may furtherbe configured to receive information regarding a period and a peakvoltage of a triangular wave supplied to the motor from the sensor tocollect statistical data regarding a characteristic of the triangularwave by analyzing a change pattern of the period and the peak voltage ofthe triangular wave based on operation durability. The controller mayfurther include a parameter correction unit configured to correct aminimum voltage of the triangular wave based on the collectedstatistical data regarding the characteristic of the triangular wave tomaintain a peak voltage of the triangular wave at a predeterminedreference value or greater. In addition, the parameter correction unitmay further be configured to receive information regarding a referenceaxis for changing an operation direction of the motor from the sensor,and the parameter correction unit may be configured to correct thereference axis to an initial factory value when a cumulative error ofthe reference axis is equal to or greater than a predetermined referencevalue.

In another aspect of the present invention, it may be possible toprovide a computer-readable recording medium recording a program forexecuting one of the methods of controlling the motor described above.In addition, it may be possible to provide a recording medium recordinga computer-readable program to execute one of methods of controllingvehicle security communication.

It should be noted that the above-mentioned technical solutions aremerely a part of exemplary embodiments of the present invention, andvarious exemplary embodiments reflecting technical characteristics ofthe present invention may be derived and understood by those skilled inthe art from detailed description of the present invention given below.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are included to provide a furtherunderstanding of the invention and are incorporated in and constitute apart of this application, illustrate exemplary embodiment(s) of theinvention and together with the description serve to explain theprinciple of the invention. In the drawings:

FIG. 1 is a block diagram for description of a vehicle motor controlsystem according to an exemplary embodiment of the present invention;

FIG. 2 is a block diagram illustrating an internal configuration of acontroller for controlling motor driving according to an exemplaryembodiment of the present invention;

FIG. 3 is a flowchart illustrating a method of dynamically changing aparameter for determining whether a motor stalls in a controllerconfigured to drive a motor according to an exemplary embodiment of thepresent invention;

FIG. 4 is a flowchart illustrating a method of dynamically changing aparameter for determining whether the motor has stalled in thecontroller configured to drive a motor according to another exemplaryembodiment of the present invention;

FIG. 5 is a flowchart illustrating a method of dynamically changing aparameter for determining whether the motor has stalled in thecontroller configured to drive a motor according to another exemplaryembodiment of the present invention;

FIG. 6 is a flowchart illustrating a method of dynamically changing aparameter for determining whether the motor has stalled in thecontroller configured to drive a motor according to another exemplaryembodiment of the present invention;

FIG. 7 is a diagram illustrating experimental data for description of achange in driving speed of the motor in response to a temperature changeaccording to an exemplary embodiment of the present invention;

FIG. 8 is a flowchart illustrating a method of dynamically changing aparameter for determining whether the motor has stalled in thecontroller configured to drive a motor according to another exemplaryembodiment of the present invention; and

FIG. 9 is a diagram illustrating a structure of a triangular wave and aV-T characteristic of the triangular wave according to operationdurability according to an exemplary embodiment of the presentinvention.

DETAILED DESCRIPTION

It is understood that the term “vehicle” or “vehicular” or other similarterm as used herein is inclusive of motor vehicles in general such aspassenger automobiles including sports utility vehicles (SUV), buses,trucks, various commercial vehicles, watercraft including a variety ofboats and ships, aircraft, and the like, and includes hybrid vehicles,electric vehicles, combustion, plug-in hybrid electric vehicles,hydrogen-powered vehicles and other alternative fuel vehicles (e.g.fuels derived from resources other than petroleum).

Although exemplary embodiment is described as using a plurality of unitsto perform the exemplary process, it is understood that the exemplaryprocesses may also be performed by one or plurality of modules.Additionally, it is understood that the term controller/control unitrefers to a hardware device that includes a memory and a processor. Thememory is configured to store the modules and the processor isspecifically configured to execute said modules to perform one or moreprocesses which are described further below.

Furthermore, control logic of the present invention may be embodied asnon-transitory computer readable media on a computer readable mediumcontaining executable program instructions executed by a processor,controller/control unit or the like. Examples of the computer readablemediums include, but are not limited to, ROM, RAM, compact disc(CD)-ROMs, magnetic tapes, floppy disks, flash drives, smart cards andoptical data storage devices. The computer readable recording medium canalso be distributed in network coupled computer systems so that thecomputer readable media is stored and executed in a distributed fashion,e.g., by a telematics server or a Controller Area Network (CAN).

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the invention. Asused herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising,” when used in this specification, specify thepresence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneor more other features, integers, steps, operations, elements,components, and/or groups thereof. As used herein, the term “and/or”includes any and all combinations of one or more of the associatedlisted items.

Unless specifically stated or obvious from context, as used herein, theterm “about” is understood as within a range of normal tolerance in theart, for example within 2 standard deviations of the mean. “About” canbe understood as within 10%, 9%, 8%, 7%, 6%, 5%, 4%, 3%, 2%, 1%, 0.5%,0.1%, 0.05%, or 0.01% of the stated value. Unless otherwise clear fromthe context, all numerical values provided herein are modified by theterm “about.”

Reference will now be made in detail to an apparatus and various methodsto which the preferred embodiments of the present invention are applied.

Although all elements constituting the embodiments of the presentinvention are described as being integrated into a single one oroperated as a single one, the present invention is not necessarilylimited to such exemplary embodiments. According to exemplaryembodiments, all of the elements may be selectively integrated into oneor more and be operated as one or more within the object and the scopeof the present invention. Each of the elements may be implemented asindependent hardware. Alternatively, some or all of the elements may beselectively combined into a computer program having a program moduleperforming some or all functions combined in one or more pieces ofhardware. Code and code segments constituting the computer program maybe easily reasoned by those skilled in the art to which the presentinvention pertains.

All terms including technical or scientific terms have the same meaningsas generally understood by a person having ordinary skill in the art towhich the present invention pertains unless mentioned otherwise.Generally used terms, such as terms defined in a dictionary, should beinterpreted to coincide with meanings in the related art from thecontext. Unless obviously defined in the present invention, such termsare not interpreted as having ideal or excessively formal meanings.

It will be understood that, although the terms first, second, A, B, (a),(b), etc. may be used herein to describe various elements of the presentinvention, these terms are only used to distinguish one element fromanother element and essence, order, or sequence of correspondingelements are not limited by these terms. It will be understood that whenone element is referred to as “connected to”, “coupled to”, or“accessing” another element, one element may be “connected to”, “coupledto”, or “access” another element via a further element although oneelement may be directly connected to or directly access another element.

FIG. 1 is a diagram for description of a vehicle motor control systemaccording to an exemplary embodiment of the present invention. Referringto FIG. 1, the vehicle system may include controllers configured tooperate motors having various uses and mechanical characteristics. Thecontrollers configured to drive or operate the motor may correspond to aparticular domain (network), and the controllers in the domain may beconnected to the same network to communicate with each other. Inaddition, the controllers in the particular domain may communicate witha controller of another domain via a vehicle gateway 10. Examples of thedomain may include a body domain, a chassis domain, a driver assistancesystem domain, a power train domain, a surround view domain, a head unitdomain, etc. However, the invention is not limited thereto, and itshould be noted that a name and a type of a corresponding domain maydiffer according to a vehicle manufacturer and a vehicle model.

In addition, a communication scheme between the vehicle gateway 10 and anetwork may be different for each domain, and an in-vehiclecommunication system may include a plurality of vehicle gateways. Forexample, examples of a communication scheme applicable to the in-vehiclecommunication system may include controller area network (CAN)communication, local interconnect network (LIN) communication, FlexRaycommunication, Ethernet communication, etc. However, the invention isnot limited thereto.

Referring to FIG. 1, a controller A-1 (e.g., a first controller)included in a network A 20 may be configured to communicate with acontroller B-1 (e.g., a second controller) included in a network B 30.In addition, information collected by controllers may be transmitted toan information collection terminal 40 via the vehicle gateway (orrouter) 10. In particular, the information collection terminal 40 maycorrespond to an on-board diagnostics (OBD) terminal. However, theinvention is not limited thereto. According to another exemplaryembodiment of the present invention, the information collection terminal40 may correspond to a user terminal (e.g., a smartphone, a notebook,etc.) capable of accessing a vehicle head unit (not illustrated)connected to the vehicle gateway 10.

Each controller may be linked to a motor sensor to collect various typesof sensing information from the motor sensor. Particularly, the sensinginformation may include output voltage information of a motor,information regarding a period and a peak voltage of a triangular wavefor motor driving, temperature information, driving speed information ofthe motor, information regarding a noise deviation measured in themotor, current reference axis information, etc. However, the inventionis not limited thereto.

Further, a controller may be configured to generate a rule forcorrection of a motor control limit value through learning usingreceived sensing information, and reflect the generated rule in a lookuptable. Thereafter, the controller may be configured to adaptivelycompensate for a limit value for dynamically adjusting motor drivingwith reference to the lookup table during motor driving. In general, themotor may undergo mechanical wear and change in electricalcharacteristics over time and according to an increase in the number oftimes of driving (e.g., an increase in use of the motor), that is,according to operation durability. As a result, various parameter valuesinitially set for motor control, for example, various reference valuesfor determining whether the motor has stalled, a reference axis foradjusting an operation direction of the motor, etc. may be invalid.

In addition, the motor may undergo change in operating characteristicsbased on change in external or internal environment, for example,temperature change, humidity change, etc. As an example, when anexternal temperature decreases, a driving speed of the motor maydecrease. As another example, when an increase in humidity occurssimultaneously with decrease in external temperature, freezing mayoccur. As a result, a driving speed of the motor may decrease, and noisemay occur. In particular, a determination as to whether the motor hasstalled and adjustment of motor driving based on the determination aredirectly related to a lifespan of the motor. Additionally, various motordevices related to driving safety and user convenience affect customersatisfaction, and should be more accurately operated for safe driving.

FIG. 2 illustrates an internal configuration of a controller 200configured to adjust motor driving according to an exemplary embodimentof the present invention. Referring to FIG. 2, the controller 200 mayinclude a communication unit 210, a motor sensing information collectionunit 220, a timer 230, a counter update unit 240, a motor stalldetermination unit 250, a parameter correction unit 260, acharacteristic parameter table 270, a motor driving unit 280, and acontrol unit 290. The various units may be executed by controller 200having a processor and a memory. It should be noted that the componentsof the controller 200 are not essential, and thus the controller 200 mayinclude more components or fewer components. In addition, it should benoted that some components of the controller 200 may be configured ashardware or software, and may be merged or divided into two or morecomponents when functions thereof are separated from each other.

The communication unit 210 may be configured to perform communicationbetween controllers and communication with a motor sensor connected to acorresponding motor. In addition, the communication unit 210 may beconfigured to receive a clock signal (or message) for acquisition ofsynchronization necessary for an internal operation of the controller200 from another controller.

The motor sensing information collection unit 220 may be configured tocollect motor sensing information received from the communication unit210 and statistically process the information. In particular, the motorsensing information may include output voltage information of the motor,information regarding a period and a peak voltage of a triangular wavefor motor driving, temperature information of the motor, driving speedinformation of the motor, information regarding a noise deviationmeasured in the motor, current reference axis information, etc. However,the invention is not limited thereto. For example, the motor sensinginformation collection unit 220 may be configured to collect statisticaldata regarding change in motor output voltage based on a motor drivingtime and the number of times of driving the motor. In addition, themotor sensing information collection unit 220 may be configured tostatistically process information regarding a period and a peak voltageof a triangular wave for motor driving based on a motor driving time andthe number of times of driving the motor. The motor sensing informationcollection unit 220 may also be configured to collect statistical dataregarding change in driving speed of the motor according to change intemperature.

In addition, the motor sensing information collection unit 220 may beconfigured to calculate a cumulative error of a reference axis using thereference axis information. Particularly, the reference axis maycorrespond to a reference value for adjusting an operation direction ofthe motor and determining a limit point of an operation of the motor.For example, when cumulative voltage consumption within an operationrange of the motor which operates in a horizontal direction is about 0to 5 V, an initial factory reference axis may be set to about 2.5 V.However, the initially set reference axis may be moved based onoperation durability. Movement of the reference axis may beaccumulative, and an error based on the movement may be accumulated.Thus, the motor may not operate normally. For example, when an error ofa reference axis is accumulated in a door mirror, the mirror may not becompletely closed or opened. Therefore, correction of the reference axismay be necessary for accurate operation of the motor.

The timer 230 may include a total driving time timer configured tocalculate a total driving time of the motor, a motor sensing cycle timerconfigured to adjust a reception period of the motor sensing informationreceived from the motor sensor, a cycle timer configured to calculate adriving time of the motor each time the motor is driven, etc. However,the invention is not limited thereto. The counter update unit 240 mayinclude a stall counter configured to determine whether the motor hasstalled, an operation durability counter configured to calculate anoperation durability limit by counting the number of times of drivingthe motor, etc. However, the invention is not limited thereto.

The motor stall determination unit 250 may be configured to determinewhether the motor has stalled based on a motor output voltage valuereceived from the motor sensor according to an algorithm to be describedbelow illustrated in FIG. 3, and adaptively update a limit registervalue for executing motor driving based on a determination result. Forexample, updated parameters may include a bottom value and a limitregister value used to determine whether the motor has stalled of FIG. 3to be described below. However, the invention is not limited thereto. Inaddition, the motor stall determination unit 250 may be configured tochange the bottom value based on change of the operation direction ofthe motor, and set the limit register value to an initial factory valuewhen a particular condition is satisfied. A specific operation of themotor stall determination unit 250 will become clearer throughdescription of drawings below.

The parameter correction unit 260 may be configured to determine variousparameters for dynamically operating the motor based on the statisticaldata collected by the motor sensing information collection unit 220, andreflect the determined parameters in the characteristic parameter table270. For example, the parameter correction unit 260 may be configured todetermine a limit value, which is to be used to determine whether themotor has stalled, to be corrected based on a characteristic change involtage V and period T of a triangular wave according to operationdurability, and record the determined threshold value in thecharacteristic parameter table 270.

In addition, the parameter correction unit 260 may be configured todetermine logic for compensating for a motor driving speed for eachtemperature based on a change in motor driving speed according to achange in temperature, and record the determined logic in thecharacteristic parameter table 270. For example, the parametercorrection unit 260 may be configured to calculate a motor driving speeddecrease rate based on a decrease in temperature, determine a motordriving voltage level for inverse compensation that corresponds to thedecrease rate, and record the determined level in the characteristicparameter table 270. For example, particular parameter values, forexample, a motor driving voltage, a revolutions per minute (RPM) of themotor, etc. may be determined to allow a motor driving speed to increaseby about 10% compared to a reference motor driving speed each time atemperature decreases by about 4° C.

When a reference axis, which serves as a standard for a change of adirection of the motor, changes, the parameter correction unit 260according to the present embodiment may be configured to correct thereference axis. In general, when the motor is driven repeatedly, areference axis for determining a limit value of the motor in aparticular direction may gradually change. When a cumulative error ofthe reference axis increases, a movement limit point of the motor maychange. For example, when an error of the reference axis accumulates, aside-view mirror may not be completely unfolded or folded in towards tothe vehicle.

Therefore, the parameter correction unit 260 may be configured todynamically correct an error in the reference axis based on learningdata regarding a change amount of the reference axis according tooperation durability. For example, an error in the reference axis may becalculated and recorded when the motor, which moves in right and leftdirections, is alternately driven about 500 times (e.g., for about 2,000seconds) at a cycle of four seconds, and the reference axis may becorrected based on previous errors in the reference axis calculatedabout every 500 times.

The motor driving unit 280 may be configured to execute motor drivingbased on a control signal of the control unit 290. For example, themotor driving unit 280 may be configured to turn power supplied to themotor on and off based on a predetermined control signal of the controlunit 290. In addition, the motor driving unit 280 may be configured tochange a driving direction of the motor based on a control signal of thecontrol unit 290. For example, the motor driving unit 280 may beconfigured to change a driving direction of the motor by changing adirection of a current applied to the motor or by shifting a phase.

Further, the motor driving unit 280 may be configured to supply atriangular wave (e.g., alternating current (AC) power) necessary formotor driving to the motor. Furthermore, the motor driving unit 280 maybe configured to correct a minimum voltage Vm of the triangular wave tomaintain a peak voltage Vp of the triangular wave at a predeterminedreference value or greater based on a control signal of the control unit290. The control unit 290 may configured to execute the overalloperation of the controller 200.

FIG. 3 illustrates a method of dynamically changing a parameter fordetermining whether the motor has stalled in the controller configuredto execute and adjust motor driving according to an exemplary embodimentof the present invention. Referring to FIG. 3, in S301, the controller200 may be configured to initialize a stall counter and a bottom value.

When the motor is driven based on an external control signal in S303,the controller 200 may be configured to receive sensing information on amotor output voltage Vt from a corresponding motor sensor at everypredetermined motor sensing cycle in S305. In S307, the controller 200may be configured to compare whether the motor output voltage Vt isgreater than a predetermined limit value. In particular, the limit valuemay correspond to a sum of an offset value and a limit register valuestored in advance. When the motor output voltage Vt is greater than thelimit value as a result of comparison in S307, the controller 200 may beconfigured to increment the stall counter by 1, and set the motor outputvoltage Vt to the bottom value in S309.

Subsequently, in S311, the controller 200 may be configured to determinewhether a current stall counter value is equal to a predefined maximumstall count. In S313, when the current stall counter value is equal tothe predefined maximum stall count as a result of determination, thecontroller 200 may be configured to determine that the motor has stalledto block supply of power to the motor and change the limit registervalue to the bottom value set in S309. Particularly, the limit registervalue may be recorded in a nonvolatile memory, for example, anelectrically erasable programmable read-only memory (EEPROM), andmaintained irrespective of whether the vehicle is started.

When the motor output voltage Vt does not exceed the limit value inS307, the controller 200 may be configured to decrement the stallcounter by 1, and then compare whether the stall counter is equal to 0in S315 to S317. When the stall counter is equal to 0 as a result ofcomparison, the controller 200 may be configured to cancel the bottomvalue set in S309 and return to S305. Meanwhile, when the current stallcounter value is not equal to the predefined maximum stall count as aresult of determination in S311, the controller 200 may return to S305described above. In addition, when the stall counter is not equal to 0in S317, the controller 200 may return to S305 described above.

FIG. 4 illustrates a method of dynamically changing a parameter fordetermining whether the motor has stalled in the controller configuredto execute motor driving according to another exemplary embodiment ofthe present invention. Referring to FIG. 4, in S401, the controller 200may be configured to receive sensing information regarding a motoroutput voltage Vt from a corresponding motor sensor at everypredetermined motor sensing cycle while a bottom value (e.g., a lowestvalue) is set. In response to determining a change in driving directionof the motor based on an external control signal, that is, upondetection of phase shift, the controller 200 may be configured to set amotor output voltage Vt received before phase shifting to the bottomvalue in S403 to S405.

FIG. 5 illustrates a method of dynamically changing a parameter fordetermining whether the motor has stalled in the controller configuredto execute motor driving according to another exemplary embodiment ofthe present invention. Referring to FIG. 5, in S501, the controller 200may be configured to initialize a cycle timer and a cycle timerexpiration counter for each motor. Thereafter, when a motor is drivenbased on an external control signal, the controller 200 may beconfigured to drive or operate a cycle timer that corresponds to thedriven motor in S503 to S505.

In this instance, in response to determining that the motor has stalledaccording to the method of FIG. 3, the controller 200 may be configuredto change a limit register value to the set bottom value and store thechanged value. Further, when the driven cycle timer expires while themotor does not stall, the controller 200 may be configured to incrementthe cycle timer expiration counter by 1, and compare whether the cycletimer expiration counter is equal to a predetermined maximum expirationcounter in S509 to S511.

When the cycle timer expiration counter is equal to the predeterminedmaximum expiration counter as a result of determination, the controller200 may be configured to change the limit register value to an initialfactory value, that is, an initial limit register set value in S513.When the cycle timer expiration counter is not equal to thepredetermined maximum expiration counter in S511, for example, when thecycle timer expiration counter is less than the predetermined maximumexpiration counter, the controller 200 may return to S507 describedabove and verify whether the motor has stalled. Through theabove-described method of FIG. 5, the controller 200 may be configuredto prevent a failure in detection of motor stall due to a continuousincrease in limit register value.

FIG. 6 illustrates a method of dynamically changing a parameter fordetermining whether the motor has stalled in the controller configuredto execute motor driving according to another exemplary embodiment ofthe present invention. Referring to FIG. 6, in S601, the controller 200may be configured to receive temperature information and informationregarding an operating speed of a driven motor at predeterminedintervals from a motor sensor that corresponds to the motor.

In S603 to S605, the controller 200 may be configured to collectstatistical data regarding a temperature characteristic for identifyinga change in operating speed of the motor based on temperature, andgenerate a rule for correction of a motor control limit value based onthe collected statistical data regarding the temperature characteristic.Thereafter, in S607, the controller 200 may be configured to execute oradjust motor driving using a parameter value corrected based on thegenerated rule for correction of the motor control limit value. As anexample, when a temperature decreases, a driving speed of the motordecreases, and thus the controller 200 may be configured to correct apredetermined driving time restriction parameter for adjusting a drivingtime of the motor to a greater value. As another example, the controller200 may be configured to correct a predetermined motor driving speedcontrol parameter for increasing a driving speed of the motor astemperature decreases.

FIG. 7 illustrates experimental data illustrating a change in drivingspeed of the motor in response to temperature change according to anexemplary embodiment of the present invention. Specifically, FIG. 7illustrates a box plot showing a change in driving speed of a mirrordriving motor when the motor is driven in a particular direction, forexample, upward/downward/inward/outward at ambient temperature and atlow temperature (e.g., about −10° C. and −20° C.) to detect a lower partof a dimensional limit of the motor.

Boxes 710 and 720 of FIG. 7 indicate that, when the motor is drivendownward, an average motor driving speed decreases as a temperaturedecreases. The box 710 indicates that a maximum speed is about 3.1degrees/sec, a minimum speed is about 2.2 degrees/sec, and an averagespeed is about 2.6 degrees/sec in motor driving speeds of cases 4, 5,and 6 on an x-axis. Similarly, it may be understood that an averagemotor driving speed decreases as temperature decreases when the motor isdriven in another particular direction.

According to an exemplary embodiment of the present invention,statistical information regarding a change in motor driving speed may becollected based on a change in temperature for each motor type, thecollected information may be reflected in a lookup table of acontroller, and a limit value for adjusting motor driving may beadaptively corrected with reference to the lookup table based ontemperature value sensed during motor driving. For example, thecontroller may be configured to correct the limit value for adjustingmotor driving to cause a motor driving speed to gradually increasewithin a range of an operating speed of the motor that corresponds to aconventional reference specification as temperature decreases.

FIG. 8 illustrates a method of dynamically changing a parameter fordetermining whether the motor has stalled in the controller configuredto execute motor driving according to another exemplary embodiment ofthe present invention. Referring to FIG. 8, in S801, a controller 200may be configured to receive information regarding a period T and a peakvoltage Vp of a triangular wave at predetermined intervals from a motorsensor that corresponds to a driven motor.

In S803, the controller 200 may be configured to collect statisticaldata regarding a V-T characteristic of the triangular wave by analyzinga change pattern of the period T and the peak voltage Vp of thetriangular wave based on operation durability. For example, thecontroller 200 may be configured to collect statistical data foridentifying a change in period and peak voltage of the triangular wavebased on the number of times of driving the motor or a cumulative motordriving time. The controller 200 may be configured to generate a rulefor correction of a motor control limit value based on the collectedstatistical data regarding the V-T characteristic of the triangular wavein S805, and dynamically correct a minimum voltage Vm of the triangularwave with reference to the generated rule for correction to maintain thepeak voltage Vp of the triangular wave at a predetermined referencevalue or greater in S807.

FIG. 9 illustrates a structure of a triangular wave and a V-Tcharacteristic of the triangular wave based on operation durabilityaccording to an exemplary embodiment of the present invention. Referringto FIG. 9, a box 900 shows the structure of the triangular wave. Thetriangular wave may be defined by a voltage V and a period T.

A box 910 shows a distribution of voltages of the triangular wave basedon operation durability. Specifically, the box 910 shows a distributionof voltages of the triangular wave based on a driving direction at aninitial driving time and a time that corresponds to half of an operationdurability limit (e.g., about 5,000 cycles) for a motor, which has theoperation durability limit of about 10,000 cycles. The box 910 showsthat an overall voltage level is high when the motor is driven upward,and shows a characteristic in which an average voltage level decreasesand a variance increases based on operation durability in the same motordriving direction.

A box 920 shows a distribution of periods of the triangular wave basedon operation durability. Specifically, the box 920 shows a distributionof periods of the triangular wave based on a driving direction at aninitial driving time and a time that corresponds to half of an operationdurability limit (e.g., about 5,000 cycles) for a motor, which has theoperation durability limit of about 10,000 cycles. The box 920 showsthat an overall period value is high when the motor is driven upward,and shows a characteristic in which an average period value decreasesand a variance decreases based on operation durability in the same motordriving direction.

Effects of the method and apparatus according to the present inventionare described below.

The present invention has an advantage of providing a method, anapparatus and a system for controlling a motor based on motor stalldetection. In addition, the present invention has an advantage ofproviding a method, an apparatus and a system for controlling a motorbased on motor stall detection capable of dynamically changing variousparameter values for motor driving control by collecting and learningsensing information during motor driving. The present invention also hasan advantage of providing a general-purpose motor operation controllogic for each motor type. The present invention has an advantage ofenhancing reliability of a motor system by determining and dynamicallysetting a motor driving control limit value and various parameters basedon statistical data learned based on sensing information collectedduring motor driving.

Effects that may be obtained from the present invention are not limitedto the above-mentioned effects, and other effects not mentioned hereinmay be clearly understood by those skilled in the art from the abovedescription. Those skilled in the art will appreciate that the presentinvention may be executed in other specific ways than those set forthherein without departing from the spirit and essential characteristicsof the present invention.

The above exemplary embodiments are therefore to be construed in allaspects as illustrative and not restrictive. The scope of the inventionshould be determined by the appended claims and their legal equivalents,not by the above description, and all changes coming within the meaningand equivalency range of the appended claims are to be embraced therein.

What is claimed is:
 1. A method of controlling a motor in a controller,comprising: driving, by a motor driving unit, the motor based on anexternal control signal; receiving, by a motor sensing informationcollection unit, information regarding an output voltage of the motor ata predetermined motor detection cycle from a sensor that corresponds tothe motor; setting, by a motor stall determination unit, a bottom valueby comparing a level of the received output voltage of the motor with apreset limit value; and changing, by the motor stall determination unit,the limit value to the set bottom value when the level of the receivedoutput voltage of the motor exceeds the limit value a predeterminednumber of times corresponding to a predetermined threshold value.
 2. Themethod according to claim 1, wherein a predetermined stall counter isincreased when the level of the output voltage of the motor exceeds thelimit value, and the predetermined stall counter is decreased when thelevel of the output voltage of the motor is less than the limit value,wherein the set bottom value is released when the stall counter has avalue of about
 0. 3. The method according to claim 2, wherein the motoris determined to have stalled when the level of the received outputvoltage of the motor exceeds the limit value the predetermined number oftimes corresponding to the predetermined threshold value, and powersupply to the motor is blocked.
 4. The method according to claim 1,wherein a value of the output voltage of the motor received before anoperation direction of the motor is changed is set to the bottom valuewhen the operation direction of the motor is changed while the bottomvalue is set.
 5. The method according to claim 1, further comprising:calculating, by a timer, a cumulative driving time of the motor afterthe motor is detected to have stalled, wherein the limit value ischanged to an initial factory value when the motor is not detected tohave stalled again until the cumulative driving time exceeds apredetermined reference value.
 6. The method according to claim 1,further comprising: operating, by a timer, a predetermined cycle timerwhen the motor is driven, wherein the limit value is changed to aninitial factory value when the cycle timer expires a number of timescorresponding to a predetermined maximum expiration count while themotor is not detected to have stalled.
 7. The method according to claim1, further comprising: receiving, by the motor sensing informationcollection unit, information regarding a temperature and a motoroperating speed from the sensor; collecting, by the motor sensinginformation collection unit, statistical data regarding a temperaturecharacteristic for identifying a change in motor operating speed basedon the temperature; generating, by a parameter correction unit, a rulefor correction of the limit value based on the statistical dataregarding the temperature characteristic; and adjusting, by acontroller, driving of the motor using a parameter value corrected basedon the generated rule for correction of the limit value.
 8. The methodaccording to claim 1, further comprising: receiving, by the motorsensing information collection unit, information regarding a period anda peak voltage of a triangular wave supplied to the motor from thesensor; collecting, by the motor sensing information collection unit,statistical data regarding a characteristic of the triangular wave byanalyzing a change pattern of the period and the peak voltage of thetriangular wave based on operation durability; and correcting, by aparameter correction unit, a minimum voltage of the triangular wavebased on the collected statistical data regarding the characteristic ofthe triangular wave to maintain a peak voltage of the triangular wave ata predetermined reference value or greater.
 9. The method according toclaim 1, further comprising: receiving, by the motor sensing informationcollection unit, information regarding a reference axis for changing anoperation direction of the motor from the sensor; and correcting, by aparameter correction unit, the reference axis to an initial factoryvalue when a cumulative error of the reference axis is equal to orgreater than a predetermined reference value.
 10. A controllerconfigured to execute driving of a motor, comprising: a communicationunit configured to receive an external control signal for the motordriving; a motor sensing information collection unit configured toreceive information regarding an output voltage of the motor at apredetermined motor detection cycle from a sensor that corresponds tothe motor when the motor is driven based on the external control signal;and a motor stall determination unit configured to set a bottom value bycomparing a level of the received output voltage of the motor with apreset limit value, determine that the motor has stalled when the levelof the received output voltage of the motor exceeds the limit value apredetermined number of times corresponding to a predetermined thresholdvalue, and change the limit value to the set bottom value.
 11. Thecontroller according to claim 10, wherein the motor stall determinationunit is configured to increase a predetermined stall counter when thelevel of the output voltage of the motor exceeds the limit value, anddecrease the predetermined stall counter when the level of the outputvoltage of the motor is less than the limit value, wherein the motorstall determination unit is configured to release the set bottom valuewhen the stall counter has a value of about
 0. 12. The controlleraccording to claim 11, wherein the motor stall determination unit isconfigured to determine that the motor has stalled when the level of thereceived output voltage of the motor exceeds the limit value thepredetermined number of times corresponding to the predeterminedthreshold value.
 13. The controller according to claim 12, furthercomprising: a motor driving unit configured to execute an operation ofthe motor, wherein the motor driving unit is configured to block powersupply to the motor when the motor has stalled.
 14. The controlleraccording to claim 10, wherein the motor stall determination unit isconfigured to set a value of the output voltage of the motor receivedbefore an operation direction of the motor is changed to the bottomvalue when the operation direction of the motor is changed while thebottom value is set.
 15. The controller according to claim 10, furthercomprising: a timer configured to calculate a cumulative driving time ofthe motor after the motor is detected to have stalled, wherein the motorstall determination unit is configured to set the limit value to aninitial factory value when the motor is not detected to have stalledagain until the cumulative driving time exceeds a predeterminedreference value.
 16. The controller according to claim 10, furthercomprising: a timer configured to operate a predetermined cycle timerwhen the motor is driven, wherein the motor stall determination unit isconfigured to set the limit value to an initial factory value when thecycle timer expires a number of times corresponding to a predeterminedmaximum expiration count while the motor is not detected to havestalled.
 17. The controller according to claim 10, wherein the motorsensing information collection unit is configured to receive informationregarding a temperature and a motor operating speed from the sensor tocollect statistical data regarding a temperature characteristic foridentifying a change in motor operating speed based on the temperature.18. The controller according to claim 17, further comprising: aparameter correction unit configured to generate a rule for correctionof the limit value based on the statistical data regarding thetemperature characteristic, wherein driving of the motor is adjustedusing a parameter value corrected based on the generated rule forcorrection of the limit value.
 19. The controller according to claim 10,wherein the motor sensing information collection unit is configured toreceive information regarding a period and a peak voltage of atriangular wave supplied to the motor from the sensor to collectstatistical data regarding a characteristic of the triangular wave byanalyzing a change pattern of the period and the peak voltage of thetriangular wave based on operation durability.
 20. The controlleraccording to claim 19, further comprising: a parameter correction unitconfigured to correct a minimum voltage of the triangular wave based onthe collected statistical data regarding the characteristic of thetriangular wave to maintain a peak voltage of the triangular wave at apredetermined reference value or greater, wherein the parametercorrection unit is configured to receive information regarding areference axis for changing an operation direction of the motor from thesensor, and the parameter correction unit is configured to correct thereference axis to an initial factory value when a cumulative error ofthe reference axis is equal to or greater than a predetermined referencevalue.